Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

thicken border on hover instead of resizing #3062

Merged
merged 2 commits into from
Sep 22, 2023
Merged

Conversation

johrstrom
Copy link
Contributor

Fixes #3016 by thicken border on hover instead of resizing.

@Oglopf
Copy link
Contributor

Oglopf commented Sep 21, 2023

I like this. One thing though is the bottom project icon for templates will shift when the upper icon is hovered over, which is small but wonky.

I'm trying to add a fix to handle the padding so it doesn't shift on hover, video below to show this:
Screencast from 09-21-2023 09:40:31 AM.webm

@johrstrom
Copy link
Contributor Author

Yea I noticed that too. I can look into it.

@Oglopf
Copy link
Contributor

Oglopf commented Sep 21, 2023

I think this will do the trick. I need to clean it up some, but I'm having to do full rebuilds right now for some reason to get changes making this burdensome to test. Hoping tmro that has somehow resolved. But, here's what finally got things working:

.project-icon {
  position: relative; 
  padding: 0.3rem;
  margin: 0.5rem;
  border: 0.25em solid rgb(26, 118, 211);
  border-radius: 10%;

  &:hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 0.15em solid rgb(26, 118, 211); 
    border-radius: inherit;
    pointer-events: none;
  }

  a {
    text-decoration: none;
  }

  button {
    text-decoration: none !important;
  }
}

@Oglopf
Copy link
Contributor

Oglopf commented Sep 21, 2023

And even with that i can see a little white showing up in the thickened border that needs smoothed out so it's not perfect. But, the elements all stay where they should be.

@johrstrom
Copy link
Contributor Author

I found we can use outline instead of border. PTAL, I think that's what we're looking for.

https://developer.mozilla.org/en-US/docs/Web/CSS/outline#description

Copy link
Contributor

@Oglopf Oglopf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@johrstrom johrstrom merged commit 04caf85 into master Sep 22, 2023
20 checks passed
@johrstrom johrstrom deleted the project-highlight branch September 22, 2023 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

replace transform in style editable-form-field
3 participants